/*
 * @Author: C.
 * @Date: 2023-04-10 13:26:23
 */
import { useForm, FormProps } from '/@/components/Form';
import type { DynamicProps } from '/#/utils';
type Props = Partial<DynamicProps<FormProps>>;
export function useAppForm(props: Props): ReturnType<typeof useForm> {
  const _props: Props = {
    baseColProps: {
      span: 6,
      xxl: 6,
      xl: 8,
      lg: 8,
      md: 8,
      sm: 12,
      xs: 24,
    },
    layout: 'vertical',
    rowProps: {
      gutter: 20,
    },
    fieldMapToTime: [['DatePeriod', ['StartDate', 'EndDate']]],
    showActionButtonGroup: false,
  };

  return useForm({
    ...props,
    ..._props,
  });
}
